<?php

namespace app\api\controller\v1\user;

use app\api\controller\BaseController;
use app\api\server\user\LoginServer;
use app\api\validate\user\LoginValidate;
use support\Request;
use support\Response;

class LoginController extends BaseController
{
    /**
     * Notes:账号密码等里
     * @param Request $request
     * @return Response
     */
    public function phoneLogin(Request $request) : Response
    {
        $params = $request->all();
        $this->validate($params, LoginValidate::class . '.login');
        return json(LoginServer::phoneLogin($params));
    }

}